package cn.edu.scau.cmi.chengruyuan.test;

public class Node {
	private static MyList<Node> subNodes = null;
	private String nodeName;
	
	public Node (String nodeName) {
		this.nodeName = nodeName;
	}
	
	public MyList<Node> getList () {
		return subNodes;
	}
	
	public void add (Node node) {
		if (subNodes == null) {
			subNodes = new MyList<Node>();
		}
		
		subNodes.add(node);
	}
	
	public String getNodeInfo () {
		return "nodename: " + nodeName;
	}
}
